
#ifndef __SDK_SYSTEM_MAP__INCLUDE__
#define __SDK_SYSTEM_MAP__INCLUDE__

#include "Utility/ErrorCode.h"
#include "ServiceAgent.h"

namespace nebula { namespace sdk {

// IServiceInfo
class IServiceInfo
{
public:
	virtual ~IServiceInfo() {}

public:
	virtual const char*    GetServiceName   () = 0;
	virtual ServiceState   GetServiceState  () = 0;
	virtual unsigned int   GetTodoQueueSize () = 0;
	virtual unsigned int   GetDoneQueueSize () = 0;
	virtual unsigned int   GetDoingCount    () = 0;
	virtual unsigned int   GetConfigCount   () = 0;
	virtual const char*    GetConfigAt      (unsigned int index) = 0;
};


// INodeInfo
class INodeInfo
{
public:
	virtual ~INodeInfo() {}

public:
	virtual const char*    GetNodeName      () = 0;
	virtual const char*    GetHostPort      () = 0;

	virtual unsigned int   GetServiceCount  () = 0;
	virtual IServiceInfo*  GetServiceAt     (unsigned int index) = 0;
};


// ISystemMap
class ISystemMap
{
protected:
	virtual ~ISystemMap() {}

public:
	virtual unsigned int   GetNodeCount     () = 0;
	virtual INodeInfo*     GetNodeAt        (unsigned int index) = 0;
	virtual INodeInfo*     GetSelfNode      () = 0;
};


}} //end of nebula::sdk

#endif //__SDK_SYSTEM_MAP__INCLUDE__

